﻿using System;
using System.Data;
using WP.Commons;

namespace WP.RM.DataEntity
{
    //=========MCity  ============================
    [System.ComponentModel.DesignerCategory("Code")]
    public class RMWorkingProcedureDEL : DataSet, IDataEntity
    {
        //=========mCity ============================
        public const string TABLENAME_RMWorkingProcedure = "rmWorkingProcedure";
        public const string RECID = "RecId";
        public const string WorkingProcedureID = "WorkingProcedureID";
        public const string WorkingProcedureName = "WorkingProcedureName";
        public const string WKOut = "WKOut";
        public const string Unit="Unit";
        public const string GYUsed="GYUsed";
        public const string FianUsed="FianUsed";
        public const string IsDetail = "IsDetail";
        public const string RECSTAMP = "RecStamp";
        public const string Remark = "Remark";
        private System.Collections.Specialized.NameValueCollection mVarCollection = new System.Collections.Specialized.NameValueCollection();
        public System.Collections.Specialized.NameValueCollection VarCollection
        {
            get { return mVarCollection; }
            set { mVarCollection = value; }
        }

        public RMWorkingProcedureDEL()
        {
            //Create mCity structure
            CreatemCityStructure();

        }

        //=========mCity============================
        private void CreatemCityStructure()
        {
            DataTable table;
            DataColumnCollection DCC;
            DataColumn DC = new DataColumn();
            table = new DataTable(TABLENAME_RMWorkingProcedure);
            DCC = table.Columns;

            DC = new DataColumn(RECID, typeof(System.Int32));
            DCC.Add(DC);

            DC = new DataColumn(RECSTAMP, typeof(System.Byte[]));
            DCC.Add(DC);

            DC = new DataColumn(Remark, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(WorkingProcedureID, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(WorkingProcedureName, typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(WKOut, typeof(System.String));
            DC.DefaultValue = "";
            DC.MaxLength = 50;
            DCC.Add(DC);

            DC = new DataColumn(Unit , typeof(System.String));
            DC.DefaultValue = "";
            DCC.Add(DC);

            DC = new DataColumn(IsDetail , typeof(System.Boolean ));
            DC.DefaultValue = 0;            
            DCC.Add(DC);

            DC = new DataColumn(FianUsed, typeof(System.Boolean));
            DC.DefaultValue = 0;
            DCC.Add(DC);

            DC = new DataColumn(GYUsed , typeof(System.String));
            DC.DefaultValue = 0;
            DCC.Add(DC);
            this.Tables.Add(table);
        }
    }
}
